home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8" ?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:external="http://www.seapine.com" exclude-result-prefixes="external" id="TT V5.0 NonDetailReport.xslt">
-
- <!-- Parameters used by the server, DO NOT MODIFY -->
- <xsl:param name="ChartFileNames" />
- <xsl:param name="Legend" />
- <xsl:variable name="RecordsPerPage" select="SeapineReport/rows_per_page" />
-
- <!-- Specifies the maximum number of charts that will appear on a single row in the html output -->
- <xsl:param name="MaxChartsPerLine" select="3" />
-
- <!-- Specifies the background color to use for every other row in the report detail -->
- <xsl:param name="AlternateRowColor" select=" '#99CCFF' " />
-
- <!-- Contains the default settings for the table containing the page header -->
- <xsl:attribute-set name="report-pageheader-table-format">
- <xsl:attribute name="width">100%</xsl:attribute>
- <xsl:attribute name="border">0</xsl:attribute>
- <xsl:attribute name="cellpadding">0</xsl:attribute>
- <xsl:attribute name="cellspacing">0</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains external image tag for the image in the page header -->
- <xsl:attribute-set name="report-pageheader-image">
- <xsl:attribute name="src">
- <xsl:value-of select="external:get-server-image('seapinelogo.jpg')" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for table cell containing the image in the page header -->
- <xsl:attribute-set name="report-pageheader-image-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">ReportTitleClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the column heading table cells -->
- <xsl:attribute-set name="report-header-title-format">
- <xsl:attribute name="align">right</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">ReportTitleClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the reporting period in the page header-->
- <xsl:attribute-set name="report-header-reporting-date-format">
- <xsl:attribute name="align">center</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">SubtotalCellClass</xsl:attribute>
- <xsl:attribute name="colspan">2</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the report footer table -->
- <xsl:attribute-set name="report-pagefooter-table-format">
- <xsl:attribute name="width">100%</xsl:attribute>
- <xsl:attribute name="border">0</xsl:attribute>
- <xsl:attribute name="cellpadding">0</xsl:attribute>
- <xsl:attribute name="cellspacing">0</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the report detail table -->
- <xsl:variable name="detail-table-bordersize" select="0" />
- <xsl:variable name="detail-table-width" select=" '100%' " />
- <xsl:variable name="detail-table-cellpadding" select="2" />
- <xsl:variable name="detail-table-cellspacing" select="0" />
- <xsl:attribute-set name="report-detail-table-format">
- <xsl:attribute name="width">
- <xsl:value-of select="$detail-table-width" disable-output-escaping = "yes" />
- </xsl:attribute>
- <xsl:attribute name="border">
- <xsl:value-of select="$detail-table-bordersize" disable-output-escaping = "yes" />
- </xsl:attribute>
- <xsl:attribute name="cellpadding">
- <xsl:value-of select="$detail-table-cellpadding" disable-output-escaping = "yes" />
- </xsl:attribute>
- <xsl:attribute name="cellspacing">
- <xsl:value-of select="$detail-table-cellspacing" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the column heading table cells -->
- <xsl:attribute-set name="report-column-heading-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="bgcolor">#2B558A</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">ColumnHeaderClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the row heading table cells -->
- <xsl:attribute-set name="report-row-heading-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">RowHeaderClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the data cells for the report detail table-->
- <xsl:attribute-set name="report-data-cell-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">DataCellClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the data cells for the report detail table-->
- <xsl:attribute-set name="report-subtotal-cell-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">SubtotalCellClass</xsl:attribute>
- </xsl:attribute-set>
-
- <xsl:attribute-set name="report-column-total-row-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="bgcolor">#6699cc</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">ColumnTotalClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Contains the default settings for the data cells for the report detail table-->
- <xsl:attribute-set name="report-pagefooter-cell-format">
- <xsl:attribute name="align">left</xsl:attribute>
- <xsl:attribute name="valign">middle</xsl:attribute>
- <xsl:attribute name="class">DataCellClass</xsl:attribute>
- </xsl:attribute-set>
-
- <!-- Defines the default font settings used in the report -->
- <xsl:template name="DefineStyles">
- <!-- Default font settings for the image displayed in the left hand area of the Report Header -->
- <STYLE>
- .ReportTitleGraphicClass {
- FONT-FAMILY: 'serif';
- FONT-SIZE: 30px;
- COLOR: #2B558A;
- FONT-WEIGHT:bold;
- }
- </STYLE>
- <!-- Default font settings for the title of the report displayed in the right hand area of the Report Header -->
- <STYLE>
- .ReportTitleClass {
- FONT-FAMILY: 'serif';
- FONT-SIZE: 30px;
- COLOR: #2B558A;
- FONT-WEIGHT:bold;
- }
- </STYLE>
- <!-- Default font settings for the report detail Column Headings -->
- <STYLE>
- .ColumnHeaderClass {
- font-family: 'sans-serif';
- font-weight: bold;
- font-size: 12px;
- COLOR: white;
- }
- </STYLE>
- <!-- Default font settings for the report detail Row Headings -->
- <STYLE>
- .RowHeaderClass {
- font-family: 'sans-serif';
- font-weight: bold;
- font-size: 12px;
- COLOR: black;
- }
- </STYLE>
- <!-- Default font settings for the report detail data cells -->
- <STYLE>
- .DataCellClass {
- font-family: 'sans-serif';
- font-weight: ;
- font-size: 12px;
- COLOR: black;
- }
- </STYLE>
- <!-- Default font settings for the report detail subtotal cells -->
- <STYLE>
- .SubtotalCellClass {
- font-family: 'sans-serif';
- font-weight: bold ;
- font-size: 12px;
- COLOR: black;
- }
- </STYLE>
- <!-- Default font settings for the report detail column total cells -->
- <STYLE>
- .SubtotalCellClass {
- font-family: 'sans-serif';
- font-weight: bold ;
- font-size: 12px;
- COLOR: black;
- }
- </STYLE>
- </xsl:template>
-
- <!-- Overrides the field format for a cell from the XML data if the user overrode any of the stylesheet settings -->
- <xsl:template name="OverrideCellFormat">
- <xsl:if test="HAlign">
- <xsl:attribute name="align">
- <xsl:value-of select="HAlign" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="VAlign">
- <xsl:attribute name="valign">
- <xsl:value-of select="VAlign" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="Width">
- <xsl:attribute name="width">
- <xsl:value-of select="Width" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="Height">
- <xsl:attribute name="height">
- <xsl:value-of select="Height" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="BackgroundColor">
- <xsl:attribute name="bgcolor">
- <xsl:value-of select="BackgroundColor" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- </xsl:template>
-
- <!-- Displays the Column Heading Row of the Report Detail Tablel -->
- <xsl:template match="TableHeader">
- <tr class="ColumnHeaderClass">
- <xsl:for-each select="ColHeading">
- <TD xsl:use-attribute-sets="report-column-heading-format">
- <xsl:call-template name="OverrideCellFormat" />
- <span style="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily} ">
- <xsl:if test="string-length(Label)>0">
- <xsl:value-of select="Label" disable-output-escaping = "yes" />
- </xsl:if>
- <xsl:if test="string-length(Label)=0">
- <!-- Netscape ignores backgound color if we don't do this-->
- </xsl:if>
- </span>
- </TD>
- </xsl:for-each>
- </tr>
- </xsl:template>
-
- <!-- If an alternate row color is defined in the xsl variable "AlternateRowColor" this template will adjust the background color for the row -->
- <xsl:template name="AlternateRowColors">
- <xsl:if test="string-length($AlternateRowColor) > 0 ">
- <xsl:if test="((position() mod 2) = 0)">
- <xsl:attribute name="bgcolor">
- <xsl:value-of select="$AlternateRowColor" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- </xsl:if>
- </xsl:template>
-
- <!-- Displays the rows for Report Detail Table -->
- <xsl:template match="Row">
- <!-- Outputs a row for the table -->
- <tr>
- <xsl:call-template name="AlternateRowColors" />
- <xsl:apply-templates select="RowHeading" />
- <xsl:apply-templates select="Col" />
- <xsl:apply-templates select="Subtotal" />
- </tr>
- <!-- Determines if a page break is needed -->
- <xsl:call-template name="CheckRecordPagination">
- <xsl:with-param name="Page" select="position() div $RecordsPerPage" />
- </xsl:call-template>
- </xsl:template>
-
- <!-- Determines if a page break is needed -->
- <xsl:template name="CheckRecordPagination">
- <xsl:param name="Page" />
- <xsl:param name="tabledef">table</xsl:param>
- <xsl:if test="($RecordsPerPage > 0) and (position()!=last())">
- <xsl:if test="(position() mod $RecordsPerPage) = 0">
- <!-- End previous detail table -->
- <xsl:text disable-output-escaping="yes"></table></xsl:text>
- <!-- Output page break -->
- <DIV style="page-break-after:always"></DIV>
- <!-- Output a new page header -->
- <xsl:call-template name="pageheader" />
- <!-- start a new detail table -->
- <xsl:text disable-output-escaping="yes"><table width="</xsl:text>
- <xsl:value-of select="$detail-table-width" disable-output-escaping = "yes" />
- <xsl:text disable-output-escaping="yes">" border="</xsl:text>
- <xsl:choose>
- <xsl:when test="ancestor::SeapineReport/Report/BorderSize">
- <xsl:value-of select="ancestor::SeapineReport/Report/BorderSize" disable-output-escaping = "yes" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$detail-table-bordersize" disable-output-escaping = "yes" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text disable-output-escaping="yes">" cellpadding="</xsl:text>
- <xsl:choose>
- <xsl:when test="ancestor::SeapineReport/Report/CellPadding">
- <xsl:value-of select="ancestor::SeapineReport/Report/CellPadding" disable-output-escaping = "yes" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$detail-table-cellpadding" disable-output-escaping = "yes" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:text disable-output-escaping="yes">" cellspacing="</xsl:text>
- <xsl:choose>
- <xsl:when test="ancestor::SeapineReport/Report/CellSpacing">
- <xsl:value-of select="ancestor::SeapineReport/Report/CellSpacing" disable-output-escaping = "yes" />
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$detail-table-cellspacing" disable-output-escaping = "yes" />
- </xsl:otherwise>
- </xsl:choose>
- <xsl:if test="ancestor::SeapineReport/Report/TableBackgroundColor">
- <xsl:text disable-output-escaping="yes">" bgcolor="</xsl:text>
- <xsl:value-of select="ancestor::SeapineReport/Report/TableBackgroundColor" disable-output-escaping = "yes" />
- </xsl:if>
- <xsl:text disable-output-escaping="yes">" ></xsl:text>
- <!-- Output the table's header row on the new page-->
- <xsl:apply-templates select="ancestor::SeapineReport/Report/TableHeader" />
- </xsl:if>
- </xsl:if>
- </xsl:template>
-
- <!-- Outputs the row heading for the report detail table -->
- <xsl:template match="RowHeading">
- <TD xsl:use-attribute-sets="report-row-heading-format">
- <xsl:call-template name="OverrideCellFormat" />
- <span STYLE="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily}; ">
- <xsl:if test="string-length(Label)>0">
- <xsl:value-of select="Label" disable-output-escaping = "yes" />
- </xsl:if>
- <xsl:if test="string-length(Label)=0">
- <!-- Netscape ignores backgound color if we don't do this-->
- </xsl:if>
- </span>
- </TD>
- </xsl:template>
-
- <!-- Outputs the data cells for the report detail table -->
- <xsl:template match="Col">
- <TD xsl:use-attribute-sets="report-data-cell-format">
- <xsl:call-template name="OverrideCellFormat" />
- <span STYLE="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily}; ">
- <xsl:if test="string-length(Data)>0">
- <xsl:value-of select="Data" disable-output-escaping = "yes" />
- </xsl:if>
- <xsl:if test="string-length(Data)=0">
- <!-- Netscape ignores backgound color if we don't do this-->
- </xsl:if>
- </span>
- </TD>
- </xsl:template>
-
- <!--Outputs the Subtotals cell for the report detail table -->
- <xsl:template match="Subtotal">
- <TD xsl:use-attribute-sets="report-subtotal-cell-format">
- <xsl:call-template name="OverrideCellFormat" />
- <span STYLE="color:{FontColor}; font-size:{FontSize}; font-weight:{FontWeight}; font-family:{FontFamily}; ">
- <xsl:if test="string-length(Data)>0">
- <xsl:value-of select="Data" disable-output-escaping = "yes" />
- </xsl:if>
- <xsl:if test="string-length(Data)=0">
- <!-- Netscape ignores backgound color if we don't do this-->
- </xsl:if>
- </span>
- </TD>
- </xsl:template>
-
- <!-- Outputs the Column Totals row for the report detail table -->
- <xsl:template match="TableFooter">
- <tr xsl:use-attribute-sets="report-column-total-row-format">
- <xsl:call-template name="OverrideCellFormat" />
- <xsl:apply-templates select="RowHeading" />
- <xsl:apply-templates select="Subtotal" />
- </tr>
- </xsl:template>
-
- <!-- Overrides the format for the report detail table from the XML data if the user overrode any of the stylesheet settings -->
- <xsl:template name="OverRideDetailTableFormat">
- <xsl:if test="Report/BorderSize">
- <xsl:attribute name="border">
- <xsl:value-of select="Report/BorderSize" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="Report/CellPadding">
- <xsl:attribute name="cellpadding">
- <xsl:value-of select="Report/CellPadding" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="Report/CellSpacing">
- <xsl:attribute name="cellspacing">
- <xsl:value-of select="Report/CellSpacing" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="Report/TableBackgroundColor">
- <xsl:attribute name="bgcolor">
- <xsl:value-of select="Report/TableBackgroundColor" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- </xsl:template>
-
- <!-- Outputs the Report Detail Table -->
- <xsl:template name="createtable">
- <table xsl:use-attribute-sets="report-detail-table-format">
- <xsl:call-template name="OverRideDetailTableFormat" />
- <xsl:call-template name="processreport" />
- </table>
- </xsl:template>
-
- <!-- Overrides the format for the report header table from the XML data if the user overrode any of the stylesheet settings -->
- <xsl:template name="OverRideReportHeaderTableFormat">
- <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/BorderSize">
- <xsl:attribute name="border">
- <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/BorderSize" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/CellPadding">
- <xsl:attribute name="cellpadding">
- <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/CellPadding" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/CellSpacing">
- <xsl:attribute name="cellspacing">
- <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/CellSpacing" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="ancestor-or-self::SeapineReport/ReportHeader/TableBackgroundColor">
- <xsl:attribute name="bgcolor">
- <xsl:value-of select="ancestor-or-self::SeapineReport/ReportHeader/TableBackgroundColor" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- </xsl:template>
-
- <!-- Outputs the Report Header -->
- <xsl:template name="pageheader">
- <table xsl:use-attribute-sets="report-pageheader-table-format">
- <xsl:call-template name="OverRideReportHeaderTableFormat" />
- <tr>
- <td xsl:use-attribute-sets="report-header-title-format" align="left">
- <xsl:for-each select="ancestor-or-self::SeapineReport/ReportHeader">
- <xsl:call-template name="OverrideCellFormat" />
- </xsl:for-each>
- <img xsl:use-attribute-sets="report-pageheader-image" />
- </td>
- <td xsl:use-attribute-sets="report-header-title-format">
- <xsl:for-each select="ancestor-or-self::SeapineReport/ReportHeader">
- <xsl:call-template name="OverrideCellFormat" />
- </xsl:for-each>
- <span STYLE="color:{ancestor-or-self::SeapineReport/ReportHeader/FontColor}; font-size:{ancestor-or-self::SeapineReport/ReportHeader/FontSize}; font-weight:{ancestor-or-self::SeapineReport/ReportHeader/FontWeight}; font-family:{ancestor-or-self::SeapineReport/ReportHeader/FontFamily};">
- <xsl:apply-templates select="ancestor-or-self::SeapineReport/Title" />
- </span>
- </td>
- </tr>
- </table>
- </xsl:template>
-
- <!-- Overrides the format for the report footer table from the XML data if the user overrode any of the stylesheet settings -->
- <xsl:template name="OverRideReportFooterTableFormat">
- <xsl:if test="ReportFooter/BorderSize">
- <xsl:attribute name="border">
- <xsl:value-of select="ReportFooter/BorderSize" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="ReportFooter/CellPadding">
- <xsl:attribute name="cellpadding">
- <xsl:value-of select="ReportFooter/CellPadding" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="ReportFooter/CellSpacing">
- <xsl:attribute name="cellspacing">
- <xsl:value-of select="ReportFooter/CellSpacing" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- <xsl:if test="ReportFooter/TableBackgroundColor">
- <xsl:attribute name="bgcolor">
- <xsl:value-of select="ReportFooter/TableBackgroundColor" disable-output-escaping = "yes" />
- </xsl:attribute>
- </xsl:if>
- </xsl:template>
-
- <!-- processes the page footer -->
- <xsl:template name="pagefooter">
- <table xsl:use-attribute-sets="report-pagefooter-table-format">
- <xsl:call-template name="OverRideReportFooterTableFormat" />
- <tr><td xsl:use-attribute-sets="report-pagefooter-cell-format" /> </tr>
- <tr>
- <td xsl:use-attribute-sets="report-pagefooter-cell-format">
- <xsl:for-each select="ReportFooter">
- <xsl:call-template name="OverrideCellFormat" />
- </xsl:for-each>
- <span style="color:{ReportFooter/FontColor}; font-size:{ReportFooter/FontSize}; font-weight:{ReportFooter/FontWeight}; font-family:{ReportFooter/FontFamily} ">
- <!-- place desired footer data here -->
- </span>
- </td>
- </tr>
- </table>
- </xsl:template>
-
- <!-- processes the report contents -->
- <xsl:template name="processreport">
- <xsl:if test="position()=1">
- <xsl:text disable-output-escaping="yes"><tbody></xsl:text>
- </xsl:if>
- <xsl:for-each select="Report">
- <xsl:apply-templates select="TableHeader" />
- </xsl:for-each>
- <xsl:for-each select="Report">
- <xsl:for-each select="DataRows">
- <xsl:apply-templates select="Row" />
- </xsl:for-each>
- </xsl:for-each>
- <xsl:for-each select="Report">
- <xsl:apply-templates select="TableFooter" />
- </xsl:for-each>
- <xsl:if test="position()=last()">
- <xsl:text disable-output-escaping="yes"></tbody></xsl:text>
- </xsl:if>
- </xsl:template>
-
- <!-- Creates the html for a single chart image tag-->
- <xsl:template name="createchartimgtag">
- <xsl:param name="filenamestr" />
- <xsl:param name="imageno" />
- <xsl:param name="legendstr" />
- <xsl:if test="string-length($filenamestr) > 0">
- <!-- get the imagename from the string up to the semicolon or end of string -->
- <xsl:variable name="imagename" select="substring-before($filenamestr, ';')" />
- <xsl:variable name="chartlegend" select="substring-before($legendstr, ';')" />
- <!-- output the html -->
- <td align="center" valign="top">
- <img>
- <xsl:attribute name="src">
- <xsl:if test="contains($filenamestr,';') = false">
- <xsl:value-of select="$filenamestr" disable-output-escaping = "yes" />
- </xsl:if>
- <xsl:value-of select="$imagename" disable-output-escaping = "yes" />
- </xsl:attribute>
- </img>
- </td>
- <!-- Determine if we need to build a legend for this chart -->
- <xsl:if test="string-length($legendstr) > 0">
- <td>
- <table border="2" cellpadding="1" cellspacing="2" bgcolor="white" width="100%">
- <xsl:call-template name="createlegendtag">
- <xsl:with-param name="legendstr" select="$chartlegend" />
- </xsl:call-template>
- </table>
- </td>
- </xsl:if>
- <!-- check if we need to move to a new line -->
- <xsl:if test="$imageno mod $MaxChartsPerLine = 0">
- <xsl:text disable-output-escaping="yes"></tr><tr></xsl:text>
- </xsl:if>
- <!-- look for the next occurance of image name in string -->
- <xsl:call-template name="createchartimgtag">
- <xsl:with-param name="filenamestr" select="substring-after($filenamestr, ';')" />
- <xsl:with-param name="imageno" select="$imageno+1" />
- <xsl:with-param name="legendstr" select="substring-after($legendstr, ';')" />
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <!-- create the html for a single legend tag-->
- <xsl:template name="createlegendtag">
- <xsl:param name="legendstr" />
- <xsl:if test="string-length($legendstr) > 0">
- <!-- get the imagename from the string up to the semicolon or end of string -->
- <xsl:variable name="pair" select="substring-before($legendstr, '|')" />
- <xsl:variable name="labelstr" select="substring-before($pair, ':')" />
- <xsl:variable name="colorstr" select="substring-after($pair, ':')" />
- <!-- output the html -->
- <tr>
- <td align="center" style="font-size:smaller" valign="top">
- <xsl:value-of select="$labelstr" disable-output-escaping = "yes" />
- </td>
- <td width="40px">
- <xsl:attribute name="bgColor">
- <xsl:value-of select="$colorstr" disable-output-escaping = "yes" />
- </xsl:attribute>
- </td>
- </tr>
- <!-- look for the next occurance of image name in string -->
- <xsl:call-template name="createlegendtag">
- <xsl:with-param name="legendstr" select="substring-after($legendstr, '|')" />
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
-
- <!-- Parses out the names of the chart graphic files from the ChartFileNames variable create the image tags-->
- <xsl:template name="createcharts">
- <xsl:if test="string-length($ChartFileNames) > 0">
- <table border="0" cellpadding="0" cellspacing="0" bgcolor="white">
- <tr>
- <th height="20"></th>
- </tr>
- <tr>
- <xsl:call-template name="createchartimgtag">
- <xsl:with-param name="filenamestr" select="$ChartFileNames" />
- <xsl:with-param name="imageno" select="1" />
- <xsl:with-param name="legendstr" select="$Legend" />
- </xsl:call-template>
- </tr>
- </table>
- </xsl:if>
- </xsl:template>
-
- <!-- SeapineReport XML Parsing -->
- <xsl:template match="/">
- <html>
- <head>
- <xsl:call-template name="DefineStyles" />
- </head>
- <body>
- <xsl:for-each select="SeapineReport">
- <xsl:call-template name="pageheader" />
- <xsl:call-template name="createtable" />
- <xsl:call-template name="createcharts" />
- <xsl:call-template name="pagefooter" />
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
-